#ifndef Yaogan_Hpp
#define Yaogan_Hpp

// #include <boost/asio.hpp>
// //#include <boost/bind.hpp>
// #include <boost/array.hpp>
// #include <boost/asio/steady_timer.hpp>
// #include <memory>
// #include <thread>
// #include <functional>
// #include <queue>
#include "Serial.hpp"
struct YG_value
{
  int Left_horiz;
  int Left_vertic;
  int Right_horiz;
  int Right_vertic;
  int key1;
  int key2;
  int channel;
};

class yaogan : public Serial
{
public:
  yaogan(std::string port, int baud);
  ~yaogan(){};
  int rec_ok(std::vector<u_int8_t> &msg);
  virtual void recvMsg(std::vector<u_int8_t> &msg) override;
  YG_value yg_value;
  YG_value *get_yaogan_ptr(void);
  int Get_yaogan_flag(void);
  int channel;
  int rec_flag=1;
  int rec_count=0;
  int get_rec_count(void){int rc; rc=rec_count; rec_count=0; return rc;};
};

#endif
